import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { createPinia } from 'pinia'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import "@/styles/index.scss";
import SvgIcon from "@/components/SvgIcon/index.vue";
import { createI18n } from "vue-i18n";
import EN from "./language/en/index";
import CN from "./language/cn/index";
import cnTw from "./language/cnTw/index";
const pinia = createPinia()
const app = createApp(App)
const message = {
    cn: {
        ...CN,
    },
    en: {
        ...EN,
    },
    cnTw: {
        ...cnTw,
    },
};
const i18n = createI18n({
    locale: localStorage.getItem("LANG") || "cn", // 设置语言类型
    legacy: false, // 如果要支持compositionAPI，此项必须设置为false;
    globalInjection: true, // 全局注册$t方法
    messages: message,
});
app.use(i18n);
app.component("svg-icon", SvgIcon);
app.use(ElementPlus)
app.use(pinia)
app.use(router)
app.mount('#app')
